﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;

namespace IronOne.SalesOne.SalesOneWeb.UserControls
{
    public partial class UCGridPaging : System.Web.UI.UserControl
    {
        private static int pageIndex = 0;
        private int pageSize = Convert.ToInt32(ConfigurationManager.AppSettings["GridCount"].ToString());

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        private void CalculatePages()
        { 
        
        }

        protected void btnPrevious_Click(object sender, EventArgs e)
        {
            if (pageIndex > 0)
            {
                pageIndex = pageIndex - 1;
            }
        }

        protected void txtGo_Click(object sender, EventArgs e)
        {
            int pageNo = Convert.ToInt32(txtGo.Text);
            pageIndex = pageNo;
        }

        protected void btnNext_Click(object sender, EventArgs e)
        {
            pageIndex = pageIndex + 1;
        }
    }
}